<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

	<head>
		<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
		<title></title>
		<script type="text/javascript" src="../../js/boot.js"></script>
		<script type="text/javascript" src="../../js/calendar/javascripts/simple-calendar.js"></script>
		<link rel="stylesheet" type="text/css" href="../../js/calendar/stylesheets/print.css" media="screen">
		<link rel="stylesheet" type="text/css" href="../../js/calendar/stylesheets/print.css" media="print">
		<link rel="stylesheet" type="text/css" href="../../js/calendar/stylesheets/simple-calendar.css">
		<style>
			#calendar {
				width: 100%
			}
			
			.clearfix {
				margin-bottom: 10px !important;
			}
		</style>
	</head>

	<body>

		<div id="layout1" class="mini-layout" style="width:100%;height:100%;">
			<div title="组织机构" region="west" showProxyText="true" width="200" showSplitIcon="false">
				<div class="mini-fit">
					<ul id="pageTree" class="mini-tree" style="width: 100%;" showTreeIcon="true" allowDrag="true" allowDrop="true" textField="departName" idField="departID" resultAsTree="false">
					</ul>
				</div>
			</div>
			<div title="center" region="center" id="content-wrapper">
				<div class="inner clearfix">
					<div id='calendar'>
					</div>
				</div>
			</div>
			<div title="编辑" region="east" width="260" showSplitIcon="false">
				<div id="form1">
					<legend><span>设置节日</span></legend>
					<table>
						<tr>
							<td><label>选择日期：</label></td>
							<td><input name="username" class="mini-datepicker" /></td>
						</tr>
						<tr>
							<td><label>设置类型：</label></td>
							<td><input name="Pwd" class="mini-combobox" textField="text" valueField="id" data="CONST.WorkDayType" /></td>
						</tr>
						<tr>
							<td></td>
							<td><a class="mini-button" iconCls="icon-save" onClick="save()">保存</a></td>
						</tr>
					</table>
				</div>
				<br>
				<div id="form2">
					<legend><span>设置工作时间</span></legend>
					<table>
						<tr>
							<td><label>开始日期：</label></td>
							<td><input name="username" class="mini-datepicker" format="yyyy-MM-dd HH:mm:ss" timeFormat="HH:mm:ss" showTime="true" showTodayButton="false" showClearButton="false"
								 showOkButton="true" /></td>
						</tr>
						<tr>
							<td><label>结束日期：</label></td>
							<td><input name="Pwd" class="mini-datepicker" format="yyyy-MM-dd HH:mm:ss" timeFormat="HH:mm:ss" showTime="true" showTodayButton="false" showClearButton="false"
								 showOkButton="true" /></td>
						</tr>
						<tr>
							<td><label for="pwd1$text">休息时长：</label></td>
							<td><input id="pwd1" name="Pwd" class="mini-spinner" minValue="0.5" maxValue="10" increment="0.5" tooltip="小时" /></td>
						</tr>
						<tr>
							<td></td>
							<td><a class="mini-button" iconCls="icon-save" onClick="save()">保存</a></td>
						</tr>
					</table>
				</div>
			</div>
		</div>

	</body>

	<script type="text/javascript">
		miniInit();

		var tree = mini.get("pageTree");

		// 加载浅蓝色背景和去除滚动条
		$('.mini-splitter').addClass('bg');
		//$('.fieldset-body-body').addClass('bg');

		tree.url = http.getUrl("/sys/depart/list.do");
		tree.load(tree.url);

		var editNode = null; // 当前编辑的节点
		/*********************************************************
		 * 左侧目录树的鼠标点击事件
		 *********************************************************/
		tree.on("nodedblclick", function(e) {
			// debugger
			editNode = e.node;
			tree.loadNode(editNode);
			if(editNode) {
				//search();
			}
		});
		var myCalendar = new SimpleCalendar('#calendar');
		myCalendar.addMark('2018-10-1', '8:00~17:30');
		myCalendar.addMark('2018-10-2', '8:00~17:30');
		myCalendar.addMark('2018-10-6', '8:00~17:30');
		myCalendar.addMark('2018-10-11', '8:00~17:30');
		myCalendar.showMark(true);
		myCalendar.showSolarTerm(false);
		myCalendar.showFestival(true);
	</script>

</html>